package org.goyo.main.domain.entity.base;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;
@MappedSuperclass
public class Tree implements Serializable {
  
  private static final long serialVersionUID = -9171622592751213937L;
  @Id
  @GenericGenerator(name = "generator", strategy = "org.hibernate.id.UUIDGenerator")
  @GeneratedValue(generator = "generator")
  private String uuid;
  /**
   * 分类名称
   */
  @Column
  private String name;
  /**
   * 分类编号
   */
  @Column
  private String number;
  
  /**
   * 父级菜单ID
   */
  @Column
  private String parentId;
  
  @Transient
  private String parentName;
  
  @Column
  private Integer level;
  
  
  /**
   * 是否选中
   */
  @Transient
  private boolean ischecked=false;
  
  /**
   * true 标示为子节点  false 标示为不是子节点
   */
  @Column
  @Type(type="boolean")
  private Boolean leaf = true;


  public String getUuid() {
    return uuid;
  }


  public void setUuid(String uuid) {
    this.uuid = uuid;
  }


  public String getName() {
    return name;
  }


  public void setName(String name) {
    this.name = name;
  }


  public String getNumber() {
    return number;
  }


  public void setNumber(String number) {
    this.number = number;
  }


  public String getParentId() {
    return parentId;
  }


  public void setParentId(String parentId) {
    this.parentId = parentId;
  }


  public Integer getLevel() {
    return level;
  }


  public void setLevel(Integer level) {
    this.level = level;
  }


  public boolean isIschecked() {
    return ischecked;
  }


  public void setIschecked(boolean ischecked) {
    this.ischecked = ischecked;
  }


  public Boolean getLeaf() {
    return leaf;
  }


  public void setLeaf(Boolean leaf) {
    this.leaf = leaf;
  }


  public String getParentName() {
    return parentName;
  }


  public void setParentName(String parentName) {
    this.parentName = parentName;
  }
  
  
}
